package ssw.gui.japplet;

import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class TempJFrame extends JFrame implements HasContentPane {
	/**
	 * 
	 */
	private static final long serialVersionUID = 5325933674143111591L;

	public static void main(final String[] args) {
		System.out.println("Begin");

		final TempJFrame tjf = new TempJFrame();
		tjf.setVisible(true);

		System.out.println("End");
	}

	private final Dimension PREFERRED_SIZE = new Dimension(400, 300);
	private final AppCore app = new AppCore(this);
	
	public TempJFrame() {
		super();
		initComponents();
	}

	private void initComponents() {
		setTitle("Small Scrabble Words");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		app.initComponent();
	}

	@Override
	public void switchMainPanel(JPanel panel) {
		getContentPane().removeAll();
		getContentPane().add(panel);
		setPreferredSize(PREFERRED_SIZE);
		pack();
	}
}
